*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

* {
  box-sizing: border-box;
}

ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: inherit;
  font-weight: 500;
}

body {
  --editor-primary-color: rgb(34, 100, 245);
  --editor-primary-color-10: rgba(34, 100, 245, .1);
  --editor-primary-text: rgba(0, 0, 0, .85); // 着重字体颜色
  --editor-regular-text: rgba(0, 0, 0, .65); // 常规字体颜色
  --editor-second-text: rgba(0, 0, 0, .45); // 描述字体颜色

  img {
    opacity: 1;
  }
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 右侧编辑器
.props-editor {
  padding: 0 12px;

  .ant-tabs-tab:hover,
  .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
    color: var(--editor-primary-color);
  }

  .ant-tabs-ink-bar {
    background: var(--editor-primary-color);
  }

  .prop-item-editor-wrapper {
    color: var(--editor-regular-text);

    + .prop-item-editor-wrapper {
      margin-top: 1em;
    }

    > p,
    > span {
      color: var(--editor-regular-text);
      font-size: 12px;
    }
  }

  .style-group {
    + .style-group {
      margin-top: 1em;
    }

    > p {
      color: var(--editor-regular-text);
      font-weight: 600;
      font-size: 12px;
    }
  }
}

// 编辑器内组件指示相关
.component-indicator {
  position: absolute;
  top: -2px;
  left: -2px;
  flex-wrap: nowrap;
  padding: 2px 6px;
  border-radius: 2px 2px 0 0;
  color: #ffffff;
  background-color: var(--editor-primary-color);
  font-size: 12px;
  transform: translate(0, -100%);
  pointer-events: all;

  .component-indicator-icon {
    margin-left: 6px;
  }
}

.component-indicator-wrapper {
  // position: relative;
  border: 2px solid var(--editor-primary-color);
  background: transparent;
  touch-action: none;
  pointer-events: none;

  // &::after {
  //   position: absolute;
  //   top: 0;
  //   right: 0;
  //   width: 100%;
  //   height: 100%;
  //   border: 2px solid var(--editor-primary-color);
  //   opacity: 0;
  //   content: '';
  //   pointer-events: none;
  //   z-index: 1;
  // }

  // &.active {
  //   &::after {
  //     opacity: 1;
  //   }

  //   > .component-indicator {
  //     display: flex;
  //   }
  // }
}

.CodeMirror {
  width: 100% !important;
  padding: 0;
  border-radius: 4px;
  color: #3d3d3d;
  box-shadow: inset 0 0 0 1px #dedede;
  overflow: auto;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: unset;
}

.CodeMirror-vscrollbar,
.CodeMirror-hscrollbar,
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
  display: none !important;
}

.editor-code-wrapper {
  .CodeMirror {
    width: 100% !important;
    height: calc(100vh - 103px); // 55 + 24 * 2
  }
}

.store-value-view-wrapper {
  .CodeMirror {
    min-width: 320px !important;
    max-width: 40vw !important;
    max-height: 300px;
    border: 0 !important;
  }
}

.sketch-picker {
  box-sizing: border-box !important;
  width: 100% !important;
  box-shadow: none !important;

  /* stylelint-disable */
  @at-root .ant-popover-inner-content {
    padding: 0 !important;
  }
}




.page {
  position: relative;
}
